﻿namespace Cos.Module.Blog.NHibernate.Test
{
    using System;

    using Cos.Core.NHibernate;
    using Cos.Core.NHibernate.Tests;

    using NUnit.Framework;

    [TestFixture]
    public class CommentDataModelFixture : BlogFixtureBase
    {
        [Test]
        public void CanMapCommentDataModel()
        {
            new PersistenceSpecification<CommentDataModel>(Session)
                .CheckProperty(x => x.CreationDate, new DateTime(2011, 01, 03))
                .CheckProperty(x => x.LastModified, new DateTime(2012, 01, 01))
                .CheckProperty(x => x.Title, "title test")
                .CheckProperty(x => x.Text, "text test")
                .CheckProperty(x => x.AuthorId, "123456")
                .CheckProperty(x => x.AuthorFirstName, "Bill")
                .CheckProperty(x => x.AuthorLastName, "Doe")
                //.CheckReference(x => x.ArticleCultureId, this.ArticleCulture.Id)
                .VerifyTheMappings();
        }
    }
}
